{% extends 'base.html' %}

{% block title %}登录{% endblock %}

{% block content %}
    <h2>用户登录</h2>
    {% if error %}
        <p style="color: red;">{{ error }}</p>
    {% endif %}
    <form method="post" action="{{ url_for('login') }}">
        <label for="username">用户名：</label>
        <input type="text" id="username" name="username" required><br><br>
        <label for="password">密码：</label>
        <input type="password" id="password" name="password" required><br><br>
        <input type="submit" value="登录">
    </form>
    <p>还没有账号？<a href="{{ url_for('register') }}">去注册</a></p>
{% endblock %}